Leaflet 地图开发–Leaflet Map Projection—将世界地理坐标投影到平面(和背面)上的方法对象

Leaflet 地图开发–Leaflet Map Projection—将世界地理坐标投影到平面(和背面)上的方法对象

An object with methods for projecting geographical coordinates of the world onto a flat surface (and back). See Map projection.

具有将世界地理坐标投影到平面(和背面)上的方法的对象。请参见贴图投影。

Methods

Method Returns Description
project(<LatLnglatlng) Point Projects geographical coordinates into a 2D point. Only accepts actual L.LatLng instances, not arrays.

将地理坐标投影到二维点中。只接受实际的L.LatLng实例,不接受数组。

unproject(<Pointpoint) LatLng The inverse of project. Projects a 2D point into a geographical location. Only accepts actual L.Point instances, not arrays.

Note that the projection instances do not inherit from Leaflet’s Class object, and can’t be instantiated. Also, new classes can’t inherit from them, and methods can’t be added to them with the include function.

项目的倒数。将二维点投影到地理位置。只接受实际的L.Point实例,不接受数组。请注意,投影实例不是从Leaflet的Class对象继承的,并且不能实例化。此外,新类不能从它们继承,方法也不能用include函数添加到它们中。

Properties

Property Type Description
bounds Bounds The bounds (specified in CRS units) where the projection is valid

投影有效的边界(以CRS单位指定)

Defined projections

Leaflet comes with a set of already defined Projections out of the box:
Leaflet 附带一组现成的已定义投影:
Projection Description
L.Projection.LonLat Equirectangular, or Plate Carree projection — the most simple projection, mostly used by GIS enthusiasts. Directly maps x as longitude, and y as latitude. Also suitable for flat worlds, e.g. game maps. Used by the EPSG:4326 and Simple CRS.

等矩形投影,或平板卡瑞投影-最简单的投影,主要由GIS爱好者使用。直接将x映射为经度,将y映射为纬度。也适用于平面世界,例如游戏地图。EPSG:4326和简单CRS使用。

L.Projection.Mercator Elliptical Mercator projection — more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS.

椭圆墨卡托投影-比球面墨卡托更复杂。假设地球是一个椭球体。EPSG使用:3395 CRS。

L.Projection.SphericalMercator Spherical Mercator projection — the most common projection for online maps, used by almost all free and commercial tile providers. Assumes that Earth is a sphere. Used by the EPSG:3857 CRS.

球面墨卡托投影-在线地图最常见的投影,几乎所有免费和商业瓷砖供应商都使用。假设地球是一个球体。EPSG使用:3857 CRS。

5 1 投票
文章评分
订阅评论
提醒
0 评论
最旧
最新 最多投票
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x